package com.scalar.chiptrack.operations.process;

import java.io.Serializable;

public class VendorLocation implements Serializable {

	private String select = "";
	private String priority = null;

	private String locationName = null;
	private String locationID = null;
        
        private String vendorId;

	private String split = null;
	private String capacityWeek = null;

	private float normalCost = 0.0f;
	private float expressCost = 0.0f;

	private String normalCycleTime = null;
	private String expressCycleTime = null;
	private float expectedYield = 0.0f;

	/**
	*   Three variables used in Assembly process step
	*/
	private boolean rawMaterialSource = false;
	private String rawLevelMin = null;
	private String rawLevelMax = null;

	private String checkLocations;
	/**
	*    Two variables used in Sort process step
	*/
	private boolean laserRepairAllowed = false;
	private float laserRepairCost = 0.0f;

        public VendorLocation() {
        }

        public VendorLocation (String select, 
                                 String priority,
                                 String locationName,
                                 String locationID) {
            this.select = select;
            this.priority = priority;
            this.locationName = locationName;
            this.locationID = locationID;
        }
                                  
        public VendorLocation (String priority,
                                  String locationName,
                                  String locationID,
                                  String split,
                                  String capacityWeek,
                                  float normalCost,
                                  float expressCost,
                                  String normalCycleTime,
                                  String expressCycleTime) {
            this.priority = priority;
            this.locationName = locationName;
            this.locationID = locationID;
            this.split = split;
            this.capacityWeek = capacityWeek;
            this.expressCost = expressCost;
            this.normalCost = normalCost;
            this.expressCycleTime = expressCycleTime;
            this.normalCycleTime = normalCycleTime;
        }

	public void setSelect(String select){
		this.select = select;
	}

	public String getSelect(){
		return select;
	}

	public void setPriority(String priority){
		this.priority = priority;
	}

	public String getPriority(){
		return priority;
	}

        public int getPriorityAsInt() {
	        int temp_priority = -1;
	        try {
	            temp_priority = Integer.parseInt (priority);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_priority;
    	}

	public void setLocationName(String locationName){
		this.locationName = locationName;
	}

	public String getLocationName(){
		return locationName;
	}

	public void setLocationID(String locationID){
		this.locationID = locationID;
	}

	public String getLocationID(){
		return locationID;
	}

        public int getLocationIDAsInt() {
	        int temp_locationID = -1;
	        try {
	            temp_locationID = Integer.parseInt (locationID);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_locationID;
    	}

	public void setSplit(String split){
		this.split = split;
	}

	public String getSplit(){
		return split;
	}

        public int getSplitAsInt() {
	        int temp_split = -1;
	        try {
	            temp_split = Integer.parseInt (split);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_split;
    	}
	public void setCapacityWeek(String capacityWeek){
		this.capacityWeek = capacityWeek;
	}

	public String getCapacityWeek(){
		return capacityWeek;
	}

        public int getCapacityWeekAsInt() {
	        int temp_capacityWeek = -1;
	        try {
	            temp_capacityWeek = Integer.parseInt (capacityWeek);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_capacityWeek;
    	}

	public void setNormalCost(float normalCost){
		this.normalCost = (float)normalCost;
	}

	public float getNormalCost(){
		return normalCost;
	}

	public void setExpressCost(float expressCost){
		this.expressCost = (float)expressCost;
	}

	public float getExpressCost(){
		return expressCost;
	}

	public void setNormalCycleTime(String normalCycleTime){
		this.normalCycleTime = normalCycleTime;
	}

	public String getNormalCycleTime(){
		return normalCycleTime;
	}

        public int getNormalCycleTimeAsInt() {
	        int temp_normalCycleTime = -1;
	        try {
	            temp_normalCycleTime = Integer.parseInt (normalCycleTime);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_normalCycleTime;
    	}
	public void setExpressCycleTime(String expressCycleTime){
		this.expressCycleTime = expressCycleTime;
	}

	public String getExpressCycleTime(){
		return expressCycleTime;
	}

        public int getExpressCycleTimeAsInt() {
	        int temp_expressCycleTime = -1;
	        try {
	            temp_expressCycleTime = Integer.parseInt (expressCycleTime);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_expressCycleTime;
    	}

	public void setExpectedYield(float expectedYield){
		this.expectedYield = (float)expectedYield;
	}

	public float getExpectedYield(){
		return expectedYield;
	}

	public void setRawMaterialSource(boolean rawMaterialSource){
		this.rawMaterialSource = rawMaterialSource;
	}

	public boolean getRawMaterialSource(){
		return rawMaterialSource;
	}

	public void setRawLevelMin(String rawLevelMin){
		this.rawLevelMin = rawLevelMin;
	}
	public String getRawLevelMin(){
		return rawLevelMin;
	}

        public int getRawLevelMinAsInt() {
	        int temp_rawLevelMin = -1;
	        try {
	            temp_rawLevelMin = Integer.parseInt (rawLevelMin);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_rawLevelMin;
    	}
	public void setRawLevelMax(String rawLevelMax){
		this.rawLevelMax = rawLevelMax;
	}

	public String getRawLevelMax(){
		return rawLevelMax;
	}

        public int getRawLevelMaxAsInt() {
	        int temp_rawLevelMax = -1;
	        try {
	            temp_rawLevelMax = Integer.parseInt (rawLevelMax);
	        }
	        catch (NumberFormatException nfe) {
	            // Invalid
	        }

        	return temp_rawLevelMax;
    	}

	public void setLaserRepairAllowed(boolean laserRepairAllowed){
		this.laserRepairAllowed = laserRepairAllowed;
	}
	public boolean getLaserRepairAllowed(){
		return laserRepairAllowed;
	}

	public void setLaserRepairCost(float laserRepairCost){
		this.laserRepairCost = (float)laserRepairCost;
	}
	public float getLaserRepairCost(){
		return laserRepairCost;
	}

	public void setCheckLocations(String checkLocations){
		this.checkLocations = checkLocations;
	}
	public String getCheckLocations(){
		return checkLocations;
	}
        
        public void setVendorId(String vendorId){
                this.vendorId = vendorId;
        }
        
        public String  getVendorId(){
                return vendorId;
        }     
}